package com.font;

import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.web.embedded.tomcat.TomcatConnectorCustomizer;
import org.springframework.boot.web.embedded.tomcat.TomcatServletWebServerFactory;
import org.springframework.context.annotation.Bean;

@SpringBootApplication(scanBasePackages = {"com.font.*","com.font.web"})
@MapperScan(basePackages = "com.font.mapper")
public class FaceEasyApplication {

    public static void main(String[] args) {
        SpringApplication.run(FaceEasyApplication.class, args);
    }

    @Bean

    public TomcatServletWebServerFactory tomcatServletWebServerFactory (){

        // 修改内置的 tomcat 容器配置

        TomcatServletWebServerFactory tomcatServlet = new TomcatServletWebServerFactory();

        tomcatServlet .addConnectorCustomizers((TomcatConnectorCustomizer) connector -> connector.setProperty( "relaxedQueryChars" , "[ ]" ));

        return tomcatServlet ;

    }
}
